home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsIPasswordManagerInternal.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  7KB  |  145 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIPasswordManagerInternal.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIPasswordManagerInternal_h__
  6. #define __gen_nsIPasswordManagerInternal_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIFile; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIPasswordManagerInternal */
  21. #define NS_IPASSWORDMANAGERINTERNAL_IID_STR "dc2ff152-85cb-474e-b4c2-86a3d48cf4d0"
  22.  
  23. #define NS_IPASSWORDMANAGERINTERNAL_IID \
  24.   {0xdc2ff152, 0x85cb, 0x474e, \
  25.     { 0xb4, 0xc2, 0x86, 0xa3, 0xd4, 0x8c, 0xf4, 0xd0 }}
  26.  
  27. class NS_NO_VTABLE nsIPasswordManagerInternal : public nsISupports {
  28.  public: 
  29.  
  30.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPASSWORDMANAGERINTERNAL_IID)
  31.  
  32.   /**
  33.    * A Call to find a login in the password manager list that matches the
  34.    * specified parameters. If any input parameter is null, it is
  35.    * not tested for when looking for the match.
  36.    *
  37.    * @param aHostURI The uri part of a login to search for, or null
  38.    * @param aUsername The username part of a login to search for, or null
  39.    * @param aPassword The password part of a login to search for, or null
  40.    * @param aHostURIFound The uri found in the login
  41.    * @param aUsernameFound The username found in the login
  42.    * @param aPasswordFound The password found in the login
  43.    */
  44.   /* void findPasswordEntry (in AUTF8String aHostURI, in AString aUsername, in AString aPassword, out AUTF8String aHostURIFound, out AString aUsernameFound, out AString aPasswordFound); */
  45.   NS_IMETHOD FindPasswordEntry(const nsACString & aHostURI, const nsAString & aUsername, const nsAString & aPassword, nsACString & aHostURIFound, nsAString & aUsernameFound, nsAString & aPasswordFound) = 0;
  46.  
  47.   /**
  48.    * Called to add an individual login to the list of saved logins. 
  49.    * All parameters are clear text.
  50.    *
  51.    * @param aKey The key for which the login is being remembered (often the page URI)
  52.    * @param aUser The username portion of the login
  53.    * @param aPassword The password portion of the login
  54.    * @param aUserFieldName The name of the field that contained the username
  55.    * @param aPassFieldName The name of the field that contained the password
  56.    */
  57.   /* void addUserFull (in AUTF8String aKey, in AString aUser, in AString aPassword, in AString aUserFieldName, in AString aPassFieldName); */
  58.   NS_IMETHOD AddUserFull(const nsACString & aKey, const nsAString & aUser, const nsAString & aPassword, const nsAString & aUserFieldName, const nsAString & aPassFieldName) = 0;
  59.  
  60.   /**
  61.    * Reads logins from a Mozilla Password Manager file, augmenting the current 
  62.    * in-memory set. If a duplicate entry is encountered, the data from the file
  63.    * being read replaces that currently held.
  64.    * 
  65.    * @param aPasswordFile The file to read logins from.
  66.    */
  67.   /* void readPasswords (in nsIFile aPasswordFile); */
  68.   NS_IMETHOD ReadPasswords(nsIFile *aPasswordFile) = 0;
  69.  
  70. };
  71.  
  72. /* Use this macro when declaring classes that implement this interface. */
  73. #define NS_DECL_NSIPASSWORDMANAGERINTERNAL \
  74.   NS_IMETHOD FindPasswordEntry(const nsACString & aHostURI, const nsAString & aUsername, const nsAString & aPassword, nsACString & aHostURIFound, nsAString & aUsernameFound, nsAString & aPasswordFound); \
  75.   NS_IMETHOD AddUserFull(const nsACString & aKey, const nsAString & aUser, const nsAString & aPassword, const nsAString & aUserFieldName, const nsAString & aPassFieldName); \
  76.   NS_IMETHOD ReadPasswords(nsIFile *aPasswordFile); 
  77.  
  78. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  79. #define NS_FORWARD_NSIPASSWORDMANAGERINTERNAL(_to) \
  80.   NS_IMETHOD FindPasswordEntry(const nsACString & aHostURI, const nsAString & aUsername, const nsAString & aPassword, nsACString & aHostURIFound, nsAString & aUsernameFound, nsAString & aPasswordFound) { return _to FindPasswordEntry(aHostURI, aUsername, aPassword, aHostURIFound, aUsernameFound, aPasswordFound); } \
  81.   NS_IMETHOD AddUserFull(const nsACString & aKey, const nsAString & aUser, const nsAString & aPassword, const nsAString & aUserFieldName, const nsAString & aPassFieldName) { return _to AddUserFull(aKey, aUser, aPassword, aUserFieldName, aPassFieldName); } \
  82.   NS_IMETHOD ReadPasswords(nsIFile *aPasswordFile) { return _to ReadPasswords(aPasswordFile); } 
  83.  
  84. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  85. #define NS_FORWARD_SAFE_NSIPASSWORDMANAGERINTERNAL(_to) \
  86.   NS_IMETHOD FindPasswordEntry(const nsACString & aHostURI, const nsAString & aUsername, const nsAString & aPassword, nsACString & aHostURIFound, nsAString & aUsernameFound, nsAString & aPasswordFound) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindPasswordEntry(aHostURI, aUsername, aPassword, aHostURIFound, aUsernameFound, aPasswordFound); } \
  87.   NS_IMETHOD AddUserFull(const nsACString & aKey, const nsAString & aUser, const nsAString & aPassword, const nsAString & aUserFieldName, const nsAString & aPassFieldName) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddUserFull(aKey, aUser, aPassword, aUserFieldName, aPassFieldName); } \
  88.   NS_IMETHOD ReadPasswords(nsIFile *aPasswordFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReadPasswords(aPasswordFile); } 
  89.  
  90. #if 0
  91. /* Use the code below as a template for the implementation class for this interface. */
  92.  
  93. /* Header file */
  94. class nsPasswordManagerInternal : public nsIPasswordManagerInternal
  95. {
  96. public:
  97.   NS_DECL_ISUPPORTS
  98.   NS_DECL_NSIPASSWORDMANAGERINTERNAL
  99.  
  100.   nsPasswordManagerInternal();
  101.  
  102. private:
  103.   ~nsPasswordManagerInternal();
  104.  
  105. protected:
  106.   /* additional members */
  107. };
  108.  
  109. /* Implementation file */
  110. NS_IMPL_ISUPPORTS1(nsPasswordManagerInternal, nsIPasswordManagerInternal)
  111.  
  112. nsPasswordManagerInternal::nsPasswordManagerInternal()
  113. {
  114.   /* member initializers and constructor code */
  115. }
  116.  
  117. nsPasswordManagerInternal::~nsPasswordManagerInternal()
  118. {
  119.   /* destructor code */
  120. }
  121.  
  122. /* void findPasswordEntry (in AUTF8String aHostURI, in AString aUsername, in AString aPassword, out AUTF8String aHostURIFound, out AString aUsernameFound, out AString aPasswordFound); */
  123. NS_IMETHODIMP nsPasswordManagerInternal::FindPasswordEntry(const nsACString & aHostURI, const nsAString & aUsername, const nsAString & aPassword, nsACString & aHostURIFound, nsAString & aUsernameFound, nsAString & aPasswordFound)
  124. {
  125.     return NS_ERROR_NOT_IMPLEMENTED;
  126. }
  127.  
  128. /* void addUserFull (in AUTF8String aKey, in AString aUser, in AString aPassword, in AString aUserFieldName, in AString aPassFieldName); */
  129. NS_IMETHODIMP nsPasswordManagerInternal::AddUserFull(const nsACString & aKey, const nsAString & aUser, const nsAString & aPassword, const nsAString & aUserFieldName, const nsAString & aPassFieldName)
  130. {
  131.     return NS_ERROR_NOT_IMPLEMENTED;
  132. }
  133.  
  134. /* void readPasswords (in nsIFile aPasswordFile); */
  135. NS_IMETHODIMP nsPasswordManagerInternal::ReadPasswords(nsIFile *aPasswordFile)
  136. {
  137.     return NS_ERROR_NOT_IMPLEMENTED;
  138. }
  139.  
  140. /* End of implementation class template. */
  141. #endif
  142.  
  143.  
  144. #endif /* __gen_nsIPasswordManagerInternal_h__ */
  145.